package com.jeethink.gs.service.impl;

import java.util.List;
import com.jeethink.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jeethink.gs.mapper.GsTaskExecutorMapper;
import com.jeethink.gs.domain.GsTaskExecutor;
import com.jeethink.gs.service.GsTaskExecutorService;
import com.jeethink.common.core.text.Convert;

/**
 * 任务执行人Service业务层处理
 * 
 * @author jeethink
 * @date 2022-08-08
 */
@Service
public class GsTaskExecutorServiceImpl implements GsTaskExecutorService
{
    @Autowired
    private GsTaskExecutorMapper gsTaskExecutorMapper;

    /**
     * 查询任务执行人
     * 
     * @param id 任务执行人ID
     * @return 任务执行人
     */
    @Override
    public GsTaskExecutor selectGsTaskExecutorById(String id)
    {
        return gsTaskExecutorMapper.selectGsTaskExecutorById(id);
    }

    /**
     * 查询任务执行人列表
     * 
     * @param gsTaskExecutor 任务执行人
     * @return 任务执行人
     */
    @Override
    public List<GsTaskExecutor> selectGsTaskExecutorList(GsTaskExecutor gsTaskExecutor)
    {
        return gsTaskExecutorMapper.selectGsTaskExecutorList(gsTaskExecutor);
    }

    /**
     * 新增任务执行人
     * 
     * @param gsTaskExecutor 任务执行人
     * @return 结果
     */
    @Override
    public int insertGsTaskExecutor(GsTaskExecutor gsTaskExecutor)
    {
        gsTaskExecutor.setCreateTime(DateUtils.getNowDate());
        return gsTaskExecutorMapper.insertGsTaskExecutor(gsTaskExecutor);
    }

    /**
     * 修改任务执行人
     * 
     * @param gsTaskExecutor 任务执行人
     * @return 结果
     */
    @Override
    public int updateGsTaskExecutor(GsTaskExecutor gsTaskExecutor)
    {
        return gsTaskExecutorMapper.updateGsTaskExecutor(gsTaskExecutor);
    }

    /**
     * 删除任务执行人对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteGsTaskExecutorByIds(String ids)
    {
        return gsTaskExecutorMapper.deleteGsTaskExecutorByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除任务执行人信息
     * 
     * @param id 任务执行人ID
     * @return 结果
     */
    @Override
    public int deleteGsTaskExecutorById(String id)
    {
        return gsTaskExecutorMapper.deleteGsTaskExecutorById(id);
    }
}
